<template>
	<view class="basicInformation">
		<uni-nav-bar left-icon="back" title="编辑资料" fixed="true" @clickLeft="clickBack" style="margin-top: 20px;"></uni-nav-bar>
		<view class="bg">
			<view class="geliceng" style="height: 10px;"></view>
			<account-information :users="users"></account-information>
			<personal-information :users="users" :userId="userId"></personal-information>
		</view>
	</view>
</template>

<script>
import uniNavBar from "@/components/uni-nav-bar/uni-nav-bar.vue"
import personalInformation from './components/personalInformation.vue'
import accountInformation from './components/accountInformation.vue'
import utils from '../../../utils/util.js'
export default{
	name: 'BasicInformation',
	components: {
		uniNavBar,
		personalInformation,
		accountInformation
	},
	data() {
		return {
			users: [],
			userId: ''
		}
	},
	onShow() {
		let tokenList = utils.getStorageData("token");
		this.$store.commit('setToken',tokenList.username);
		this.userId = this.$store.state.userId;
		this.users = utils.getStorageData(this.userId+'userInfo');
		console.log(this.users);
	},
	methods: {
		clickBack() {
			uni.navigateBack({
			    delta: 1
			});
		}
	}
}
</script>

<style>
	.bg{
		background-color: #EFEFEF;
	}
</style>
